package com.hjj.springboot.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.util.Date;

@TableName("t_order_tips")
@Data
public class OrderTips {

    @ExcelProperty("订单提示编号")
    @ColumnWidth(20)
    private Integer id; // 编号

    @ExcelProperty("订单号")
    @ColumnWidth(30)
    private String orderNo; //订单号

    @ExcelProperty("提示内容")
    @ColumnWidth(30)
    private String content; //内容

    @ExcelProperty("微信用户OpenId")
    @ColumnWidth(30)
    private String uId; //用户openid

    @ExcelProperty("提示类型")
    @ColumnWidth(20)
    private  String type; //提示类型

    @ExcelProperty("提示时间")
    @ColumnWidth(20)
    @JsonSerialize(using=CustomDateTimeSerializer.class)
    private Date upTime; //提示时间

    @ExcelIgnore
    @TableField(select = false ,exist = false)
    private Order order;  // 订单信息

    @ExcelIgnore
    @TableField(select = false)
    private WxUserInfo wxUserInfo;
}
